<template>
    <!-- <van-swipe class="my-swipe" :autoplay="4000" indicator-color="white">
        <van-swipe-item v-for="item in list" :key="item.imgSrc">
            <img :src="item.imgSrc" />
        </van-swipe-item>
    </van-swipe> -->

    <van-swipe class="my-swipe" :autoplay="4000" indicator-color="white">
        <van-swipe-item>
            <img src="@/assets/images/swipper1.webp" alt="">
        </van-swipe-item>
        <van-swipe-item>
            <img src="@/assets/images/swipper2.webp" alt="">
        </van-swipe-item>
        <van-swipe-item>
            <img src="@/assets/images/swipper3.webp" alt="">
        </van-swipe-item>
        <van-swipe-item>
            <img src="@/assets/images/swipper4.webp" alt="">
        </van-swipe-item>
    </van-swipe>
</template>

<script setup lang="ts">
// import axios from 'axios'
import { ref } from 'vue'
import { ISwiper } from '../types'

const list = ref<ISwiper[]>([])
// 网站做了反爬，接口已废弃
// axios({
//     url: '/swiperList',
//     method: 'get'
// }).then(res => {
//     // console.log(res.data.result)
//     list.value = res.data.result
// })
</script>

<style scoped lang="less">
.swiper {
    width: 100%;
}
</style>